🍪 cookie-es
🍪 Cookie
and Set-Cookie
parser and serializer based on cookie and set-cookie-parser with dual ESM/CJS exports and bundled types. 🎁
Usage
Install:
npx nypm install cookie-es
npm install cookie-es
yarn add cookie-es
pnpm install cookie-es
bun install cookie-es
Import:
ESM (Node.js, Bun)
import {
parse,
serialize,
parseSetCookie,
splitSetCookieString,
} from "cookie-es";
CommonJS (Legacy Node.js)
const {
parse,
serialize,
parseSetCookie,
splitSetCookieString,
} = require("cookie-es");
CDN (Deno, Bun and Browsers)
import {
parse,
serialize,
parseSetCookie,
splitSetCookieString,
} from "https://esm.sh/cookie-es";
License
MIT